package Tool_class;
//日期判断类返回的日期进行计算，情况一，二，三（正常）
public class Calculate_free {
    //根据通话时长，计算话
    private double  cost;
    //返回话费
    public double calculate(int totalminiute){
        if(totalminiute <= 20)
            cost = 0.05 * totalminiute;
        else
            cost = 1 + (totalminiute-20)*0.1;
        double  cost_free=cost;
        return cost_free;

    }
}

